package com.xxy.book.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author Xu XianYun
 * @Date 2023-01-08
 * @Description
 */
@Data
@Component
@ConfigurationProperties("jwt")
public class JwtProperties {
    /**
     * 密匙
     */
    private String apiSecretKey = "JWT_SECRET_KEY";

    /**
     * 过期时间-默认半个小时
     */
    private Long expirationTime = 1800L;

    /**
     * 默认存放token的请求头(可以自定义其他头字段)
     */
    private String requestHeader = "Authorization";

    /**
     * 默认token前缀
     */
    private String tokenPrefix = "Bearer ";
}
